package com.java.simple.smallspring.beans.factory.config;

import com.java.simple.smallspring.beans.BeansException;
import com.java.simple.smallspring.beans.factory.BeanFactory;

/**
 * @author zhoujunlin
 * @date 2022年08月20日 21:19
 * @desc
 */
public interface AutowireCapableBeanFactory extends BeanFactory {

    /**
     * 执行 BeanPostProcessors接口实现的postProcessBeforeInitialization方法
     *
     * @param existingBean
     * @param beanName
     * @return
     * @throws BeansException
     */
    Object applyBeanPostProcessorsBeforeInitialization(Object existingBean, String beanName) throws BeansException;

    /**
     * 执行 BeanPostProcessors接口实现的postProcessAfterInitialization方法
     *
     * @param existingBean
     * @param beanName
     * @return
     * @throws BeansException
     */
    Object applyBeanPostProcessorsAfterInitialization(Object existingBean, String beanName) throws BeansException;

}
